<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>项目评级-欢迎页</title>
<link href="__PUBLIC__/admin/css/style.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" src="__PUBLIC__/admin/js/jquery.js"></script>

<link href="__PUBLIC__/admin/css/select.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/admin/js/jquery.idTabs.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/admin/js/select-ui.min.js"></script>

<link href="__PUBLIC__/validform/Validform.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/validform/Validform_v5.3.2.js"></script>
<script type="text/javascript" src="__PUBLIC__/validform/Validform_Datatype.js"></script>

<link rel="stylesheet" href="__PUBLIC__/kindeditor/themes/default/default.css" />
<script type="text/javascript" src="__PUBLIC__/kindeditor/kindeditor-min.js"></script>
<script type="text/javascript" src="__PUBLIC__/kindeditor/lang/zh-CN.js"></script>

<script type="text/javascript">
var editor;
KindEditor.ready(function(K) {
	editor = K.create('textarea[id="item_content"]', {
		uploadJson : '{:U('kindeditor/upload_json',array('dir'=>image))}',
		fileManagerJson : '{:U('kindeditor/file_manager_json')}',
		allowFileManager : true,
		urlType : 'domain',
		afterCreate : function() {
			this.sync(); 
		},
		afterBlur:function(){ 
			this.sync(); 
		}
	});
});
$(document).ready(function(e) {
    $("#indus_id,#item_province,#item_city").uedSelect({
		width : 150			  
	});
});

function showcity(province){
	$("#item_city").empty();
	if(province.length>0){
		$("#item_city").append("<option value='' selected>请选择市</option>");
		$("#item_city").prev().find(".uew-select-text").html("请选择市");
		$.getJSON("{:U('itemrate/getcity')}&province="+province,function(result){
			var data=result.data;
			$.each(data, function(i, v){
				$("#item_city").append("<option value='"+v['city']+"'>"+v['city']+"</option>");
			});
		});
	}
}
</script>
</head>

<body>

	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="{:U('index/welcome')}">首页</a></li>
			<li><a href="{:U('iteminfo/index')}">项目信息</a></li>
		</ul>
    </div>

    <div class="formbody">
		<div class="formtitle"><span>添加项目</span></div>
		<form name="myform" id="myform" action="{:U('iteminfo/additem')}" method="post">
			<ul class="forminfo">
				<li><label>项目名称</label><input name="info[item_name]" id="item_name" type="text" class="dfinput" datatype="*5-30" errormsg="项目名称范围在5~30位之间！" maxlength="50" value="{$iteminfo.item_name}" /><i class="Validform_checktip"></i></li>
				<li><label>行业分类</label>
					<div class="vocation">
						<select id="indus_id" name="info[indus_id]" datatype="*" errormsg="行业分类不能为空！" >
							<option value="" selected>请选择行业分类</option>
							<volist name="indusinfo" id="data" key="key">
								<option value="{$data.indus_id}" <if condition="$data.indus_id eq $iteminfo['indus_id']">selected</if> <if condition="$data.childnum gt 0">disabled</if>>{$data.indus_title}</option>
								<if condition="$data.childnum gt 0">
									<volist name="data.child" id="child" key="keyc">
										<option value="{$child.indus_id}" <if condition="$child.indus_id eq $iteminfo['indus_id']">selected</if>>--{$child.indus_title}</option>
									</volist>
								</if>
							</volist>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>
				<li><label>地域信息</label>
					<div class="vocation">
						<select id="item_province" name="info[item_province]" datatype="*" errormsg="省不能为空！" onchange="showcity(this.value);">
							<option value="" selected>请选择省</option>
							<volist name="provinces" id="data" key="key">
								<option value="{$data.province}" <if condition="$data.province eq $iteminfo['item_province']">selected</if>>{$data.province}</option>
							</volist>
						</select>
					</div>
					<div class="vocation" style="padding-left:10px;">
						<select id="item_city" name="info[item_city]" datatype="*" errormsg="市不能为空！"  >
							<option value="" selected>请选择市</option>
							<volist name="cities" id="data" key="key">
								<option value="{$data.city}" <if condition="$data.city eq $iteminfo['item_city']">selected</if>>{$data.city}</option>
							</volist>
						</select>
					</div>
					<i class="Validform_checktip"></i>
				</li>
				<li><label>公司名称</label><input name="info[item_company]" id="item_company" type="text" class="dfinput" datatype="*"  errormsg="公司名称不能为空！" maxlength="50" value="{$iteminfo.item_company}"/><i class="Validform_checktip"></i></li>
				<li><label>公司地址</label><input name="info[item_address]" id="item_address" type="text" class="dfinput" datatype="*" errormsg="公司地址不能为空！" maxlength="100" value="{$iteminfo.item_address}" /><i class="Validform_checktip"></i></li>
				<li><label>项目联系人</label><input name="info[item_linkmen]" id="item_linkmen" type="text" class="dfinput" datatype="*2-10" errormsg="联系人在2~10位之间！" maxlength="20" value="{$iteminfo.item_linkmen}" /><i class="Validform_checktip"></i></li>
				<li><label>联系人电话</label><input name="info[item_linkphone]" id="item_linkphone" type="text" class="dfinput" datatype="*"  errormsg="联系电话不能为空或格式不正确" maxlength="phone|mobile" maxlength="30" value="{$iteminfo.item_linkphone}" /><i class="Validform_checktip"></i></li>
				<li><label>项目简介</label><textarea name="info[item_content]" id="item_content" cols="" rows="" class="textinput"  style="height: 200px;width:700px;">{$iteminfo.item_content}</textarea></li>

				<li><label>&nbsp;</label><input name="loginbtn" type="submit" class="btn" value="添加项目"/></li>
			</ul>
		</form>
    
    </div>


</body>


</html>
